/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lanSimulation.tests;
import java.io.StringWriter;
import lanSimulation.internals.AsciiDocument;
import lanSimulation.LogManager;
import java.io.Writer;
/**
 *
 * @author Administrator
 */
public class AsciiDocumentTest extends DocumentTest{

    
 public void testPrint1(){

        AsciiDocument asciidoc=new AsciiDocument("Document");
        StringWriter writer = new StringWriter();

        LogManager logman=new LogManager(writer);
        asciidoc.print(logman);

        String test = "\tAccounting -- author = 'Unknown' -- title = 'ASCII DOCUMENT'\n";
        test += ">>> ASCII Print job delivered.\n\n";

        assertEquals(test, writer.getBuffer().toString());
  }

  public void testPrint2(){

        AsciiDocument asciidoc=new AsciiDocument("author: farooq     ASCII DOCUMENT");
        StringWriter writer = new StringWriter();

        LogManager logman=new LogManager(writer);
        asciidoc.print(logman);

        String test = "\tAccounting -- author = 'farooq  ' -- title = 'ASCII DOCUMENT'\n";
        test += ">>> ASCII Print job delivered.\n\n";

        assertEquals(test, writer.getBuffer().toString());
  }
}
